package heven.holt.library.http.download

import dagger.hilt.android.EntryPointAccessors
import heven.holt.library.base.baseApplication
import heven.holt.library.di.DownloadDaoProviderEntryPoint
import heven.holt.library.http.download.iml.DownloadControllerIml

class FileDownloadBuilder(
    private val url: String,
) {
    fun build(): DownloadController {
        val downloadDao = EntryPointAccessors.fromApplication(
            baseApplication,
            DownloadDaoProviderEntryPoint::class.java
        )
            .provideDownloadDao()
        return DownloadControllerIml(url, downloadDao)
    }
}